package com.work.xxzl.base;

import android.app.Application;
import android.content.Context;
import android.os.Handler;


public class BaseApplication extends Application {
    private static Context mContext;
    private static Handler mMainHandler;
    private static int mMainThreadId;
    private static Thread mMainThread;
    public static String AgencID;


    @Override
    public void onCreate() {
        super.onCreate();

        mContext = this;
        mMainHandler = new Handler();
        mMainThreadId = android.os.Process.myTid();
        mMainThread = Thread.currentThread();

    }

    public static Handler getMainHandler() {
        return mMainHandler;
    }

    public static Context getContext() {
        return mContext;
    }

    /**
     * 获取主线程ID
     */
    public static int getMainThreadId() {
        return mMainThreadId;
    }

    public static Thread getMainThread() {
        return mMainThread;
    }


}
